__kernel void image_copy(__read_only image2d_t input,
                         __write_only image2d_t output,
                         int width, int height)
{
    int x = get_global_id(0);
    int y = get_global_id(1);
    
    if (x < width && y < height) {
        int2 coord = (int2)(x, y);
        float4 pixel = read_imagef(input, coord);
        write_imagef(output, coord, pixel);
    }
}

__kernel void image_process(__read_only image2d_t input,
                            __write_only image2d_t output,
                            int width, int height)
{
    int x = get_global_id(0);
    int y = get_global_id(1);
    
    if (x < width && y < height) {
        int2 coord = (int2)(x, y);
        float4 pixel = read_imagef(input, coord);
        
        // 简单的图像处理：反转RGB值
        pixel.x = 1.0f - pixel.x;  // R
        pixel.y = 1.0f - pixel.y;  // G
        pixel.z = 1.0f - pixel.z;  // B
        
        write_imagef(output, coord, pixel);
    }
}